/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package onpu_dms_xls.kernel.common;

import onpu_dms_xls.exceptions.MyException;

/**
 *
 * @author snbm
 */
public enum VariableType_InputRelationTypes {

    ALWAYS_IN_INPUT("ALWAYS_IN_INPUT"), SOMETIMES_IN_INPUT("SOMETIMES_IN_INPUT"), NEVER_IN_INPUT("NEVER_IN_INPUT");
    private String value;

    private VariableType_InputRelationTypes(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return getValue();
    }

    public static VariableType_InputRelationTypes getTypeFromName(String name) throws MyException {
        for (VariableType_InputRelationTypes vd : VariableType_InputRelationTypes.values()) {
            if (vd.getValue().equals(name)){
                return vd;
            }
        }
        throw new MyException("VariableType_InputRelationTypes", "getTypeFromName", "wrong name for name:"+name);

    }
}
